package br;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.event.ActionEvent;

@ManagedBean(name="bean")
@SessionScoped
public class Animal {
	private String tipo;
	private String animal;
	private String desc;
		
	public void descricao(ActionEvent e){
		desc = AnimalEnum.valueOf(animal).descricao();
	}
	
	public String getTipo() {
		return tipo;
	}
	
	public void setTipo(String tipo) {
		this.tipo = tipo;
	}
	
	public String getAnimal() {
		return animal;
	}
	
	public void setAnimal(String animal) {
		this.animal = animal;
	}
	
	public String getDesc() {
		return desc;
	}
	
	public void setDesc(String desc) {
		this.desc = desc;
	}
		
	public String toString(){		
		return "tipo: " + tipo +
			   " animal: " + animal +
			   " desc: " + desc;
	}
}
